{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import json\n",
    "import os\n",
    "import shutil"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "spec_dir = \"data/test001data/specdata\"\n",
    "\n",
    "shutil.rmtree(spec_dir, ignore_errors=True)\n",
    "os.mkdir(spec_dir)\n",
    "\n",
    "norm_dir = \"data/test001data/normdata\"\n",
    "\n",
    "shutil.rmtree(norm_dir, ignore_errors=True)\n",
    "os.mkdir(norm_dir)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### spec data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open(f\"{spec_dir}/data001.json\", encoding=\"utf-8\", mode=\"w\") as fout:\n",
    "    for i in range(1000):\n",
    "        temp_data = {\"class_value\": \"spec\", \"text\": f\"{i}\"}\n",
    "        fout.write(json.dumps(temp_data, ensure_ascii=False) + \"\\n\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### norm data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "with open(f\"{norm_dir}/data001.json\", encoding=\"utf-8\", mode=\"w\") as fout:\n",
    "    for i in range(10000):\n",
    "        temp_data = {\"class_value\": \"norm\", \"text\": f\"{i}\"}\n",
    "        fout.write(json.dumps(temp_data, ensure_ascii=False) + \"\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
